package cn.com.cym.gamezao.enums;

import io.swagger.annotations.ApiModel;

/**
 * 游戏学科 （数学，化学………………）
 */
@ApiModel("学科字段枚举")
public enum GameCourse {

    MATHEMATICS("M","数学"),
    CHEMISTRY("C","化学"),
    BIOLOGY("B","生物");

    private String sign;

    private String value;

    private GameCourse(String sign,String value){
        this.sign=sign;
        this.value=value;
    }

    public String getSign(){
        return this.sign;
    }

    public String getValue(){
        return this.value;
    }

    public  static  GameCourse fromSign(String sign){
        for(GameCourse gameCourse:GameCourse.values()){
            if(gameCourse.getSign().equals(sign)){
                return gameCourse;
            }
        }
        return  null;
    }
}
